Java is both a programming environment and a language produced by Sun Microsystems Inc. Java embraces the vision of networked computing and communications where an application may be stored on one system, yet downloaded and run on an entirely different one. Devices can download pieces of programs from different locations to run on one processor. Different processors can run a single application, passing data among each other across a network.
Java accomplishes platform independence through an intermediate computing state. Java's source is compiled into a byte code. The byte code is machine-independent, which means that interpretation must take place before the byte code runs on the native instruction set of the target processor. The interpretation is done through a Java Virtual Machine (JVM), a software layer that forms a bridge between the byte code and actual hardware. The JVM takes system calls and interprets them into corresponding machine instruction. Java allows developers to use the most productive development environment available, irrespective of platform. There is no need to develop on the same platform as the target platform or worry about cross-compiling because a Java program will run on any processor have a JVM.
Java also offers advantages during programming. Memory management is far simpler, and program bugs are fewer, because Java doesn't use pointers but utilizes references. A reference is an abstract identifier for an object. A reference tags a particular object with a name in the Java Virtual Machine so that the developer may refer to it. At the level of machine code in a CPU, a reference is an address in memory where the address of the object is stored. In this way, the objects can be moved around in memory and only the master pointer needs to be updated rather than all references to the object. This is completely hidden from the Java developer. All memory is dynamically allocated, as a variable is instantiated, but access to individual memory addresses violates the Java security model and is not permitted. Java reclaims memory through automated garbage collection. As memory is allocated, it's referenced by a variable or structure in the language. The garbage collector searches for unreferenced memory which it reclaims and adds to the free memory list, releasing developers from memory management worries.
Java developers typically make a linked list in Java using the Vector Class in java.util. Some developers assert that Java's Vector Class can do anything a linked list can do, and a little more, and saves coding.
Java is a pure object-oriented language. Every variable is an object in the class hierarchy and has a set of predefined methods, or functions, that can be used to operate it. The object model lets developers define data structures corresponding to real-life objects, making the translation between what a program has to do and how it's implemented transparent.
The advantages of Java to developers is speed of development and code maintainability. Much development involves modifying code from existing class libraries, rather then creating new structures. The object-oriented approach encourages a natural program structure, making it highly readable and easy to modify. For details and background with respect to the Java System, reference may be made to a typical text, "Just Java", 2nd Edition, Peter van der Linden, Sun Microsystems, 1997.
Java employs a platform independent file format that concatenates and compresses many Java classes, image, audio and other information into one file called a JAR (Java ARchive) file. One of the main attributes of the JAR file design is to reduce the number of HTTP (HyperText Transfer Protocol) connections that need to be opened, thus reducing download times. The file format is the popular ZIP format and can be used as a general archiving tool. The JAR archive file contains a Manifest file located at META-INF/MANIFEST.MF within the archive. This file contains information about the structure of other files within the JAR file. Applications that work with JAR files need to access the structure information contained in the Manifest file. In JavaSoft's Bean Development Kit (manufactured by JavaSoft, a division of Sun Microsystems, Inc.), the Manifest file is parsed and the data is placed in a Vector of structures called "MessageHeaders", where each MessageHeader has a couple of arrays. One array is used to hold the a key and the other holds a value. A linear search is then used to look-up values. One problem with this technique is that the performance of the search decreases as more data pairs are added. Another problem is that the technique is complex and difficult to understand.
Consequently, it would be desirable to provide a method and apparatus for creating a simple object-oriented storage structure that enables parsed data from a Manifest file to be quickly accessed and manipulated.